package com.design.FactoryVSStrategy.factory;

/**
 * @author liangxin
 * @since 27/06/2019
 */
public class FactorySimple {
    public static Operation createOperation(String name) {
        Operation operate = null;
        switch (name) {
            case "+":
                operate = new Add();
                break;
            case "-":
                operate = new Sub();
                break;
        }
        return operate;
    }
}
